﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Seagull
{
    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="TEntity"></typeparam>
    public interface IQueryRepository<TEntity> where TEntity : class, new()
    {
        /// <summary>
        /// 根据id获取单个资源
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        TEntity Get(ulong id);

        /// <summary>
        /// 根据查询条件获取符合记录的记录
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        IEnumerable<TEntity> Query(string query);
    }
}
